UserSDivOverride
Records in this table override SpiderRock global implied sdiv values in option pricing calculations.
METADATA
Attribute | Value |
---|---|
Topic | 3585-option-pricing |
MLink Token | EqtAnalytics |
Product | SRControl |
accessType | SELECT,UPDATE,INSERT,DELETE |
Table Definition
Field | Type | Key | Default Value | Comment |
---|---|---|---|---|
ekey_at | enum - AssetType | PRI | 'None' | StocKey option expiry date |
ekey_ts | enum - TickerSrc | PRI | 'None' | StocKey option expiry date |
ekey_tk | VARCHAR(12) | PRI | '' | StocKey option expiry date |
ekey_yr | SMALLINT UNSIGNED | PRI | 0 | StocKey option expiry date |
ekey_mn | TINYINT UNSIGNED | PRI | 0 | StocKey option expiry date |
ekey_dy | TINYINT UNSIGNED | PRI | 0 | StocKey option expiry date |
clientFirm | VARCHAR(16) | PRI | '' | |
sdivRate | FLOAT | 0 | ||
lnSDivRate | FLOAT | 0 | ||
shSDivRate | FLOAT | 0 | ||
text | TINYTEXT | '' | user detail if any | |
timestamp | DATETIME(6) | '1900-01-01 00:00:00.000000' |
PRIMARY KEY DEFINITION (Unique)
Field | Sequence |
---|---|
ekey_tk | 1 |
ekey_yr | 2 |
ekey_mn | 3 |
ekey_dy | 4 |
ekey_at | 5 |
ekey_ts | 6 |
clientFirm | 7 |
CREATE TABLE EXAMPLE QUERY
CREATE TABLE `SRControl`.`MsgUserSDivOverride` (
`ekey_at` ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') NOT NULL DEFAULT 'None' COMMENT 'StocKey + option expiry date',
`ekey_ts` ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') NOT NULL DEFAULT 'None' COMMENT 'StocKey + option expiry date',
`ekey_tk` VARCHAR(12) NOT NULL DEFAULT '' COMMENT 'StocKey + option expiry date',
`ekey_yr` SMALLINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'StocKey + option expiry date',
`ekey_mn` TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'StocKey + option expiry date',
`ekey_dy` TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'StocKey + option expiry date',
`clientFirm` VARCHAR(16) NOT NULL DEFAULT '',
`sdivRate` FLOAT NOT NULL DEFAULT 0,
`lnSDivRate` FLOAT NOT NULL DEFAULT 0,
`shSDivRate` FLOAT NOT NULL DEFAULT 0,
`text` TINYTEXT NOT NULL DEFAULT '' COMMENT 'user detail (if any)',
`timestamp` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000',
PRIMARY KEY USING HASH (`ekey_tk`,`ekey_yr`,`ekey_mn`,`ekey_dy`,`ekey_at`,`ekey_ts`,`clientFirm`)
) ENGINE=SRSE DEFAULT CHARSET=LATIN1 COMMENT='Records in this table override SpiderRock global implied sdiv values in option pricing calculations.';
SELECT TABLE EXAMPLE QUERY
SELECT
`ekey_at`,
`ekey_ts`,
`ekey_tk`,
`ekey_yr`,
`ekey_mn`,
`ekey_dy`,
`clientFirm`,
`sdivRate`,
`lnSDivRate`,
`shSDivRate`,
`text`,
`timestamp`
FROM `SRControl`.`MsgUserSDivOverride`
WHERE
/* Replace with a ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') */
`ekey_at` = 'None'
AND
/* Replace with a ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') */
`ekey_ts` = 'None'
AND
/* Replace with a VARCHAR(12) */
`ekey_tk` = 'Example_ekey_tk'
AND
/* Replace with a SMALLINT UNSIGNED */
`ekey_yr` = 123
AND
/* Replace with a TINYINT UNSIGNED */
`ekey_mn` = 1
AND
/* Replace with a TINYINT UNSIGNED */
`ekey_dy` = 1
AND
/* Replace with a VARCHAR(16) */
`clientFirm` = 'Example_clientFirm';
UPDATE TABLE EXAMPLE QUERY
UPDATE `SRControl`.`MsgUserSDivOverride`
SET
/* Replace with a FLOAT */
`sdivRate` = 1.23,
/* Replace with a FLOAT */
`lnSDivRate` = 1.23,
/* Replace with a FLOAT */
`shSDivRate` = 1.23,
/* Replace with a TINYTEXT */
`text` = 'dummy tiny text',
/* Replace with a DATETIME(6) */
`timestamp` = '2022-01-01 12:34:56.000000'
WHERE
/* Replace with a ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') */
`ekey_at` = 'None'
AND
/* Replace with a ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') */
`ekey_ts` = 'None'
AND
/* Replace with a VARCHAR(12) */
`ekey_tk` = 'Example_ekey_tk'
AND
/* Replace with a SMALLINT UNSIGNED */
`ekey_yr` = 123
AND
/* Replace with a TINYINT UNSIGNED */
`ekey_mn` = 1
AND
/* Replace with a TINYINT UNSIGNED */
`ekey_dy` = 1
AND
/* Replace with a VARCHAR(16) */
`clientFirm` = 'Example_clientFirm';
INSERT TABLE EXAMPLE QUERY
INSERT INTO `SRControl`.`MsgUserSDivOverride`(
/* Replace with a ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') */
`ekey_at`,
/* Replace with a ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') */
`ekey_ts`,
/* Replace with a VARCHAR(12) */
`ekey_tk`,
/* Replace with a SMALLINT UNSIGNED */
`ekey_yr`,
/* Replace with a TINYINT UNSIGNED */
`ekey_mn`,
/* Replace with a TINYINT UNSIGNED */
`ekey_dy`,
/* Replace with a VARCHAR(16) */
`clientFirm`,
/* Replace with a FLOAT */
`sdivRate`,
/* Replace with a FLOAT */
`lnSDivRate`,
/* Replace with a FLOAT */
`shSDivRate`,
/* Replace with a TINYTEXT */
`text`,
/* Replace with a DATETIME(6) */
`timestamp`
)
VALUES(
'None',
'None',
'Example_ekey_tk',
123,
1,
1,
'Example_clientFirm',
1.23,
1.23,
1.23,
'dummy tiny text',
'2022-01-01 12:34:56.000000'
);
DELETE TABLE EXAMPLE QUERY
DELETE FROM `SRControl`.`MsgUserSDivOverride`
WHERE
/* Replace with a ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') */
`ekey_at` = 'None'
AND
/* Replace with a ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') */
`ekey_ts` = 'None'
AND
/* Replace with a VARCHAR(12) */
`ekey_tk` = 'Example_ekey_tk'
AND
/* Replace with a SMALLINT UNSIGNED */
`ekey_yr` = 123
AND
/* Replace with a TINYINT UNSIGNED */
`ekey_mn` = 1
AND
/* Replace with a TINYINT UNSIGNED */
`ekey_dy` = 1
AND
/* Replace with a VARCHAR(16) */
`clientFirm` = 'Example_clientFirm';
Doc Columns Query
SELECT * FROM SRControl.doccolumns WHERE TABLE_NAME='UserSDivOverride' ORDER BY ordinal_position ASC;